package cn.yuli.store.impl;

import cn.yuli.ingredient.PizzaIngredientFactory;
import cn.yuli.ingredient.impl.BluePizzaIngredintFactory;
import cn.yuli.pizza.Pizza;
import cn.yuli.pizza.impl.*;
import cn.yuli.store.PizzaStoreFactory;
/**
 * 成都披萨工厂
 * @author yuli
 *
 */
public class ChengDUPizzaStoreFactory extends PizzaStoreFactory{
	private PizzaIngredientFactory pizzaIngredientFactory;
	public ChengDUPizzaStoreFactory() {
		pizzaIngredientFactory = new BluePizzaIngredintFactory();
	}
	@Override
	public Pizza createPizza(String type) {
		if("碳烤披萨".equals(type)){
			pizza = new BlackPizza(pizzaIngredientFactory);
		}else if("海鲜披萨".equals(type)){
			pizza = new BluePizza(pizzaIngredientFactory);
		}else if("红烧披萨".equals(type)){
			pizza = new RadPizza(pizzaIngredientFactory);
		}
		return pizza;
	}

}
